#include "friends_widget.h"

friends_widget::friends_widget(QWidget *parent) :
    QWidget(parent)//,
    //ui(new Ui::friends_widget)
{
    //ui->setupUi(this);
    dataplot = new dataPlot();
    onepersonplot = new onePerson();

    scroll = new QScrollArea(this);
    scrollAreaWidgetContents = new QWidget();
    scrollAreaWidgetContents->setObjectName("scrollAreaWidgetContents");
    scroll->setFrameShape(QFrame::StyledPanel);
    scroll->setWidgetResizable(true);
    scroll->setWidget(scrollAreaWidgetContents);

    /* 设置布局 */
    layout = new QVBoxLayout(scrollAreaWidgetContents);
    layout->setSpacing(0);
    layout->setContentsMargins(0, 0, 0, 0);
    scrollAreaWidgetContents->setLayout(layout);
    hlay1 = new QHBoxLayout;
    hlay2 = new QHBoxLayout;
    hlay1->addStretch();
    hlay1->addWidget(dataplot);
    hlay1->addStretch();
    hlay2->addStretch();
    hlay2->addWidget(onepersonplot);
    hlay2->addStretch();
    layout->addStretch();
    layout->addLayout(hlay2);
    layout->addStretch();
    layout->addLayout(hlay1);
    layout->addStretch();
    scroll->show();
}

friends_widget::~friends_widget()
{

}


